package de.alfenory.autobill.entity;

import java.util.*;

/**
 *
 * @author alefen
 */
public class BookEntry {
    String account;
    List<Integer> dimension;
    double value;
    Date transactionDate;
    String description;
    
    public BookEntry() {
        this.dimension = new ArrayList<Integer>();
    }

    public String getAccount() {
        return account;
    }

    public List<Integer> getDimension() {
        return dimension;
    }

    public Date getTransactionDate() {
        return transactionDate;
    }

    public double getValue() {
        return value;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public void setTransactionDate(Date transactionDate) {
        this.transactionDate = transactionDate;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 23 * hash + Objects.hashCode(this.account);
        hash = 23 * hash + Objects.hashCode(this.dimension);
        hash = 23 * hash + (int) (Double.doubleToLongBits(this.value) ^ (Double.doubleToLongBits(this.value) >>> 32));
        hash = 23 * hash + Objects.hashCode(this.transactionDate);
        hash = 23 * hash + Objects.hashCode(this.description);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BookEntry other = (BookEntry) obj;
        if (!Objects.equals(this.account, other.account)) {
            return false;
        }
        if (!Objects.equals(this.dimension, other.dimension)) {
            return false;
        }
        if (Double.doubleToLongBits(this.value) != Double.doubleToLongBits(other.value)) {
            return false;
        }
        if (!Objects.equals(this.transactionDate, other.transactionDate)) {
            return false;
        }
        if (!Objects.equals(this.description, other.description)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "BookEntry{" + "account=" + account + ", dimension=" + dimension + ", value=" + value + ", transactionDate=" + transactionDate + ", description=" + description + '}';
    }

    
    
}
